<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>查询自定义巡查任务基本信息</title>
</head>
<body>

<script src="./js/jquery-3.6.0.js"></script>


<script>
    $(function () {
        $.ajax({
            url: "/es/inspection/list",
            success: function (result) {
                let rows = result.data.rows;
                $("#accordion").append("<div><a href=\"index.html\">预警查询列表</a></div>");
                $("#accordion").append("<div><a href=\"inspectionlist.html\">巡查作务查询列表</a></div>");
                $("#accordion").append("<h1>预警任务共计："+(rows.length)+"条</h1>");
                for (x = 0; x < rows.length; x++) {
                    let id = rows[x].taskId;
                    let t1 = rows[x].taskDetails[0].taskDetailId;
                    let t2 = rows[x].taskDetails[1].taskDetailId;
                    let t3 = rows[x].taskDetails[2].taskDetailId;
                    let ids = new Array(id,t1,t2,t3);
                    console.log(ids);
                    $("#accordion").append("<h3 id=\"taskHead" + (x + 1) + "\"" + ">预警任务" + (x + 1) + "/"+(rows.length)+" ：" + rows[x].projectName + "</h3><a href='/inspectionupload.html?ids="+ids.toString()+"'>上传</a>");
                    $("#accordion").append("<div id=\"taskId" + (x + 1) + "\"" + "><ul>" +
                        "<li>地址：" + rows[x].address + "</li>" +
                        "<li>areaCode：" + rows[x].areaCode + "</li>" +
                        "<li>areaName：" + rows[x].areaName + "</li>" +
                        "<li>createTime：" + rows[x].createTime + "</li>" +
                        "<li>expectedTime：" + rows[x].expectedTime + "</li>" +
                        "<li>pbName：" + rows[x].pbName + "</li>" +
                        "<li>pcName：" + rows[x].pcName + "</li>" +
                        "<li>projectName：" + rows[x].projectName + "</li>" +
                        "<li>taskId：" + rows[x].taskId + "</li>" +
                        "<li>taskDetails_0：" + rows[x].taskDetails[0].taskDetailId + "</li>" +
                        "<li>taskDetails_1：" + rows[x].taskDetails[1].taskDetailId + "</li>" +
                        "<li>taskDetails_2：" + rows[x].taskDetails[2].taskDetailId + "</li>" +
                        "</ul></div>");


                }
            }
        });
    });

</script>
<div id="accordion">


</div>
</body>
</html>
